import Vue from 'vue'
import Router from 'vue-router'

import test from "../components/Recognition/CarRecognition";
import Menu from "../view/Menu"
import  AllRecordList from "../components/Record/AllRecordList"
import CarRecognition from "../components/Recognition/CarRecognition";
import OwnerList from "../components/Owner/OwnerList";
import CarFlow from "../components/Record/CarFlow";
import OwnerInfo from "../components/Owner/OwnerInfo";
import AddOwner from "../components/Owner/AddOwner";
import CarInfo from "../components/Record/CarInfo";
import ChangePwd from "../components/User/ChangePwd";


import Login from "../view/Login";
import Register from "../view/Register";

Vue.use(Router)
// 组件路径与名称
export default new Router({
  routes: [
    {
      path:'/Menu',
      name:'Menu',
      component:Menu
    },

    {
      path:'/',
      name:'Login',
      component:Login
    },

    {
      path:'/Register',
      name:'Register',
      component:Register
    },

    {
      path: '/Menu',
      name: 'Menu',
      redirect: '/Menu/CarRecognition',
      component: Menu,
      children:[
        {
          path: 'AllRecordList',
          name: 'AllRecordList',
          component: AllRecordList
        },
        {
          path: 'CarRecognition',
          name: 'CarRecognition',
          component: CarRecognition
        },
        {
          path: 'CarFlow',
          name: 'CarFlow',
          component: CarFlow
        },
        {
          path: 'OwnerList',
          name: 'OwnerList',
          component: OwnerList
        },
        {
          path: 'OwnerInfo',
          name: 'OwnerInfo',
          component:OwnerInfo
        },
        {
          path: 'AddOwner',
          name: 'AddOwner',
          component: AddOwner
        },
        {
          path: 'CarInfo',
          name: 'CarInfo',
          component: CarInfo
        },
        {
          path: 'ChangePwd',
          name: 'ChangePwd',
          component: ChangePwd
        },




      ]
    }
  ]
})
